load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
    name = "goimports_lib",
    srcs = [
        "doc.go",
        "goimports.go",
        "goimports_gc.go",
    ],
    importmap = "github.com/cockroachdb/cockroach/vendor/github.com/cockroachdb/gostdlib/x/tools/cmd/goimports",
    importpath = "github.com/cockroachdb/gostdlib/x/tools/cmd/goimports",
    visibility = ["//visibility:private"],
    deps = ["//vendor/github.com/cockroachdb/gostdlib/x/tools/internal/imports"],
)

go_binary(
    name = "goimports",
    embed = [":goimports_lib"],
    visibility = ["//visibility:public"],
)
